package com.Blog.www.po;


import java.util.Objects;

/**
 * 博客的评论区的实体类
 *
 * @author 君未洋
 */
public class BlogComment {

    private int id;
    //评论id

    private int userid;
    //评论的用户的id

    private int blogid;
    //评论的博客的id

    private int prior;
    //被回复的评论的id

    private String content;
    //评论内容


    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public int getUserid() {
        return userid;
    }

    public void setUserid(int userid) {
        this.userid = userid;
    }

    public int getBlogid() {
        return blogid;
    }

    public void setBlogid(int blogid) {
        this.blogid = blogid;
    }

    public int getPrior() {
        return prior;
    }

    public void setPrior(int prior) {
        this.prior = prior;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    @Override
    public String toString() {
        return "BlogComment{" +
                "id=" + id +
                ", userid=" + userid +
                ", blogid=" + blogid +
                ", prior=" + prior +
                ", content='" + content + '\'' +
                '}';
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        BlogComment that = (BlogComment) o;
        return id == that.id && userid == that.userid && blogid == that.blogid && prior == that.prior && Objects.equals(content, that.content);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, userid, blogid, prior, content);
    }
}
